Skip to content

Fix batched forceFlush failure and make batching linear#5

Merged
psx95 merged 27 commits intopsx95:issue-8245from
zeitlinger:gregor/8296-forceflush-failure-propagation
Apr 27, 2026
Merged

Fix batched forceFlush failure and make batching linear#5
psx95 merged 27 commits intopsx95:issue-8245from
zeitlinger:gregor/8296-forceflush-failure-propagation

Conversation

@zeitlinger
Copy link
Copy Markdown

@zeitlinger zeitlinger commented Apr 21, 2026

Summary

  • make MetricExportBatcher track current batch point count incrementally so batching stays linear instead of rescanning the active batch for every metric
  • keep PeriodicMetricReader.forceFlush() aligned with the existing partial-success behavior while logging failed batch exports
  • update tests for sequential batched export and the restored forceFlush() behavior

Testing

  • ./gradlew spotlessJavaCheck :sdk:metrics:test --tests io.opentelemetry.sdk.metrics.export.PeriodicMetricReaderTest --tests io.opentelemetry.sdk.metrics.export.MetricExportBatcherTest

This is a small follow-up to open-telemetry#8296 addressing the batching complexity concern around recomputing active batch size on every metric.

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger changed the title Fix batched forceFlush failure propagation Fix batched forceFlush failure and make batching linear Apr 21, 2026
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
# Conflicts:
#	sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/export/MetricExportBatcher.java
…ropagation' into lane-a-pr-8296

# Conflicts:
#	sdk/metrics/src/test/java/io/opentelemetry/sdk/metrics/export/PeriodicMetricReaderTest.java
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@psx95 psx95 merged commit 3bfb526 into psx95:issue-8245 Apr 27, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants